This is a deadlock bug.
The following is an example of deadlock thread dump:
"ReadConfig":
waiting to lock monitor 0x000000000c02f200 (object 0x00000007d5e7a930, a java.util.logging.LogManager$LoggerContext), which is held by "SetupLogger"
"SetupLogger":
waiting to lock monitor 0x000000000e7d5dd8 (object 0x00000007d5e79cc0, a java.util.logging.LogManager), which is held by "ReadConfig"
Java stack information for the threads listed above:
===================================================
"ReadConfig":
at java.util.logging.LogManager$LoggerContext.findLogger(LogManager.java:489)
- waiting to lock <0x00000007d5e7a930> (a java.util.logging.LogManager$LoggerContext)
at java.util.logging.LogManager.setLevelsOnExistingLoggers(LogManager.java:1356)
- locked <0x00000007d5e79cc0> (a java.util.logging.LogManager)
at java.util.logging.LogManager.readConfiguration(LogManager.java:1115)
at java.util.logging.LogManager.readConfiguration(LogManager.java:988)
at Test8010939$ReadConfig.run(Test8010939.java:107)
at java.lang.Thread.run(Thread.java:722)
"SetupLogger":
at java.util.logging.LogManager.drainLoggerRefQueueBounded(LogManager.java:811)
- waiting to lock <0x00000007d5e79cc0> (a java.util.logging.LogManager)
at java.util.logging.LogManager$LoggerContext.addLocalLogger(LogManager.java:511)
- locked <0x00000007d5e7a930> (a java.util.logging.LogManager$LoggerContext)
at java.util.logging.LogManager.addLogger(LogManager.java:848)
at java.util.logging.LogManager.demandLogger(LogManager.java:405)
at java.util.logging.Logger.demandLogger(Logger.java:317)
at java.util.logging.Logger.getLogger(Logger.java:361)
at Test8010939$SetupLogger.run(Test8010939.java:95)
at java.lang.Thread.run(Thread.java:722)
More detail about this bug is at
JDK-8010939 JIRA page.
This bug is reproduced under JDK 1.7.0_17.
It started at JDK 1.7.0_13, and has been fixed since JDK 1.7.0_25.
Execute the following scripts to run the test to reproduce the bug (assume the location of the jdk7 test project is jdk7_test_home).
Linux:
${jdk7_test_home}/scripts/8010939.sh
[--monitoroff] [--javaloc path]
Windows:
%jdk7_test_home%\scripts\8010939.bat
[--monitoroff] [--javaloc path]
Example:
Use monitor to report and terminate the program when deadlock happens:
${jdk_test_home}/scripts/8010939.sh
Turn off monitor:
${jdk_test_home}/scripts/8010939.sh
--monitoroff
| Option | Function |
| --monitoroff, -mo | Turn off to stop reporting bug messages and ending program
when the test runs into the expected concurrency bug which is a
deadlock. User has to terminate the program manually when this option is set. |
| --javaloc | The location of JDK that is eligible to reproduce the bug,
if your java environment is not eligible. In this case, it's JDK 1.7.0_13. It should be the absolute path to the JDK's java starter and ended with "/". For example: ~/jdk/home/jdk1.7.0_13/bin/ |